import re
from WSOption import WSOption
from WSJob import WSJob

class DictFromFile():
	name = 'DictFromFile'
	mask = None

	options = {
	"dict": WSOption("dict", "Dict for brute", "", True, ['--dict'])
	}

	def getJob(self):
		job = WSJob()
		fh = open(self.options['dict'].value)
		while True:
			line = fh.readline()
			if not line: break
			if not line.strip(): continue
			job.put(line.strip())
		return job